{% extends 'home_layout.html' %}

{% block content %}
    <div class="summary-list">
        {% if filter_value %}
            <div class="filter-value">
                <span>{{ filter_value }}</span>
            </div>
        {% endif %}
        {% for article in article_list %}
            <div class="summary-item">
                <div class="summary-title">
                    <a href="{% url 'article_detail' blog.suffix article.id %}">{{ article.title }}</a>
                </div>
                <div class="summary-content">
                    {{ article.summary }}
                    <a href="{% url 'article_detail' blog.suffix article.id %}">>>阅读全文</a>
                </div>
                <div class="summary-footer">
                    <span>发表于 {{ article.create_time|date:"Y-m-d H:i" }}</span>
                    <span>{{ blog.user.nickname }}</span>
                    <span>阅读({{ article.read_count }})</span>
                    <a>评论({{ article.comment.count }})</a>
                    <a href="{% url 'backend:backend_edit_article' article.id %}">编辑</a>
                </div>
            </div>
        {% endfor %}
    <ul class="pagination">
        {% if page_obj.num_pages > 1 %}
                {{ page_str }}
        {% else %}
        {% endif %}
    </ul>
    </div>
{% endblock %}